﻿using System;
using System.ComponentModel;

using SBPweb.Communication.Shared.Library.Contacts;

namespace SBPweb.Communication.Client.Library.Xmpp.Contacts
{

    public partial class Contact : ContactBase, INotifyPropertyChanged
    {

        #region Constructor logic

        public Contact(string id)
            : base(id)
        {
        }

        public Contact(string id, string displayName)
            : base(id, displayName)
        {
        }

        #endregion

        #region Property accessors

        public new ContactPresenceStateBase PresenceState
        {
            get
            {
                return base.PresenceState;
            }
            internal set
            {
                base.PresenceState = value;
                OnPropertyChanged("PresenceState");
            }
        }

        #endregion

        #region Events

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region Methods

        protected void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion

    }

}